home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
-
- <xsl:output method="html"
- doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
- $INCLUDE(commonvar.inc)$
-
- <fd:capabilities showExcerpts="true" toggleExcerpts="true" chooseContentSize="true" collapsePosts="false" itemGrouping="true" />
-
- <!-- used when grouping by date or title -->
- <xsl:key name="key-group" match="/newspaper/channel/item" use="groupId" />
-
- <xsl:variable name="feed-type" select="newspaper/channel/@feedType"/>
- <xsl:variable name="nwsp-filter" select="newspaper/@filter"/>
-
- <xsl:variable name="show-headlines-only" select="($show-excerpts=2) and ($item-count > 1)"/>
-
- <xsl:template match="newspaper">
- <html>
- <head>
- <title>Newspaper (<xsl:value-of select="title" disable-output-escaping="yes"/>)</title>
- $INCLUDE(metatrans.inc)$
-
- <style type="text/css">
- $INCLUDE(surfer.css)$
- $INCLUDE(commonstyles.css)$
-
- /* comment this rule to display item date/author/feed on a separate line */
- div.postactions, div.dateline {
- display: inline;
- padding-right: 8px;
- vertical-align: middle;
- }
-
- div.fdnewsitem {
- padding: 10px;
- text-align: left;
- border: 6px solid white; /* replaced when focused (#fdfocusedpost) */
- }
- #fdfocusedpost { border-color: $COLOR-FOCUS-HIGHLIGHT$; }
-
- /* prevent large images from overlapping subsequent posts (without the side-effects of using the 'overflow' property) */
- div.fdnewsitem, #fdfocusedpost, div.description {
- min-height: 100%;
- }
-
- div.newsitemsep {
- border-bottom: 1px dotted $COLOR-GROUP-HEADER-BORDER$;
- }
- div.newsitemtitle {
- font-size: $FONT-SIZE-NEWSPAPER$;
- margin-bottom: 8px;
- }
- div.newsitemtitle .unread { font-size: 105%; }
- a.newsitemtitle { margin-right: 4px; }
- img.toggle {
- padding: 2px 2px 2px 0;
- margin-right: 2px;
- vertical-align: middle;
- }
-
- div.dateline {
- margin: 4px 0;
- color: gray;
- font-style: italic;
- }
-
- div.description { margin: 8px 0; }
- div.description a {
- text-decoration: underline;
- }
- /* get rid of unnecessary whitespace caused by paragraphs in description*/
- div.description p {
- margin: 0;
- padding: 0;
- margin-bottom: 1em;
- }
- div.noitems { color: gray; margin: 10px 18px; }
-
- /* keep group headers on one line */
- div.groupheader {
- min-height: 20px;
- overflow: hidden;
- text-overflow: ellipsis;
- }
-
- div.postenclosure { font-weight: bold; font-size: smaller; margin-top: 6px; vertical-align: middle; }
- div.postenclosure a { font-weight: normal; }
- img.enclosure { margin-left: -2px; }
-
- #thumbnails_group {
- padding: 10px;
- text-align: center;
- border-bottom: 1px solid #555555;
- background-color: #555555;
- zoom: 100%; /* force filter */
- filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#353535,endColorStr=#959595);
- }
- img.thumbnail {
- display: inline;
- margin: 2px;
- border: 2px solid white;
- filter:progid:DXImageTransform.Microsoft.DropShadow(color=#353535,offX=3,offY=3);
- vertical-align: middle;
- height: 50px; /* all thumbnails should be same height */
- max-width: 100px;
- }
- a:hover img.thumbnail {
- border-color: #4A72EE;
- }
-
- a.share, a.reply, span.taglist { font-size: 11px; vertical-align: middle; }
- .taglist a { color: green; }
- a.share, a.reply { color: gray; }
- a.share:hover, a.reply:hover { text-decoration: none; }
-
- /* ratings (NGES) */
- a.star { padding-right: 1px;}
- a.star:hover { background-color: #fff8bf; }
-
- /* icons in header/footer */
- div#page-icons {
- float: right;
- font-size: small;
- /*font-weight: bold;*/
- margin-top: 3px;
- margin-right: 22px;
- }
- div#page-icons, div#page-icons a { color: white; }
- span#content-options { margin-left: 30px; }
- #headerimg { vertical-align: middle; }
-
- /* show border at bottom of all but last newspaper page when multiple pages exist */
- <xsl:if test="($numPages > 1) and ($numPages != $pageNum)">
- div#container { border-bottom: 2px dashed $COLOR-GROUP-HEADER-BORDER$; }
- </xsl:if>
-
- /* used when "Enable videos and other embedded content" is turned off */
- div.embed-removed {
- margin: 4px 0 !important;
- padding: 0 !important;
- }
- div.embed-removed img {
- padding: 6px 8px;
- border: 1px dotted $COLOR-SIDEBAR-BORDER$;
- background-color: $COLOR-SIDEBAR$
- }
-
- /* currently unused */
- div.fdannotation {
- border: 1px solid $COLOR-SIDEBAR-BORDER$;
- background-color: $COLOR-SIDEBAR$;
- color: $COLOR-SIDEBAR-FONT$;
- padding: 6px 8px;
- font-style: italic;
- }
-
- /* content/grouping options */
- img#content-full, img#content-excerpts, img#content-headlines, a#groupby-feed, a#groupby-date, a#groupby-title {
- vertical-align: middle;
- margin: 0 4px;
- }
- <xsl:choose>
- <xsl:when test="$show-excerpts=0">img#content-full</xsl:when>
- <xsl:when test="$show-excerpts=1">img#content-excerpts</xsl:when>
- <xsl:otherwise>img#content-headlines</xsl:otherwise>
- </xsl:choose>
- {
- border: 2px solid $COLOR-PAGEHEAD2$;
- margin: 0 2px;
- }
- <xsl:choose>
- <xsl:when test="$group-by='feed'">a#groupby-feed</xsl:when>
- <xsl:when test="$group-by='date'">a#groupby-date</xsl:when>
- <xsl:otherwise>a#groupby-title</xsl:otherwise>
- </xsl:choose>
- {
- text-decoration: none;
- border-bottom: 1px solid white;
- }
-
- /* show title on same line as post icons when displaying headlines only */
- <xsl:if test="$show-headlines-only">
- div.dateline, div.postactions, div.newsitemtitle {
- vertical-align: middle;
- margin: 0;
- padding: 0;
- }
- div.dateline { font-size: smaller; font-style: normal; }
- div.newsitemtitle, div.postactions { margin-right: 10px; }
- div.newsitemtitle { display: inline; }
- /* use overflow on link rather than entire title div so that icon after title isn't clipped */
- div.newsitemtitle a.newsitemtitle {
- zoom: 100%; /* force layout so overflow property works */
- max-width: 60%;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- div.fdnewsitem {
- display: inline-block;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- padding-top: 3px;
- padding-bottom: 3px;
- }
- div.description {
- margin-left: 20px;
- /* override .fdnewsitem above */
- display: block;
- white-space: normal;
- }
- /* display no description/excerpt when collapsed in headline view */
- div.description.collapsed {
- display: none;
- }
- /* don't show enclosure info on separate line */
- div.postenclosure {
- display: inline;
- margin-top: 0;
- margin-left: 10px;
- }
- </xsl:if>
- </style>
- </head>
- <body>
- <xsl:variable name="folderId" select="@folderId"/>
-
- <div id="pagehead">
- <div id="page-icons">
- <xsl:if test="($item-count>1)">
- <!-- group by feed/date/title -->
- <span id="groupby-options">
- <a id="groupby-feed" href="fdaction:?action=changegroupby&value=feed" title="$LANG_CONST(S_NewsHintGroupByFeed)$">$LANG_CONST(S_NewsLblGroupByFeed)$</a>
- <a id="groupby-date" href="fdaction:?action=changegroupby&value=date" title="$LANG_CONST(S_NewsHintGroupByDate)$">$LANG_CONST(S_NewsLblGroupByDate)$</a>
- <a id="groupby-title" href="fdaction:?action=changegroupby&value=title" title="$LANG_CONST(S_NewsHintGroupByTitle)$">$LANG_CONST(S_NewsLblGroupByTitle)$</a>
- </span>
- <!-- full posts/excerpts/headlines -->
- <span id="content-options">
- <a href="fdaction:?action=showexcerpts&value=0" title="$LANG_CONST(S_NewsLblShowFullPosts)$"><img id="content-full" src="$IMAGEDIR$content-full.gif" align="absmiddle" /></a>
- <a href="fdaction:?action=showexcerpts&value=1" title="$LANG_CONST(S_NewsLblShowExcerpts)$"><img id="content-excerpts" src="$IMAGEDIR$content-excerpts.gif" align="absmiddle" /></a>
- <a href="fdaction:?action=showexcerpts&value=2" title="$LANG_CONST(S_NewsLblShowHeadlines)$"><img id="content-headlines" src="$IMAGEDIR$content-headlines.gif" align="absmiddle" /></a>
- </span>
- </xsl:if>
-
- <div id="fdnewitemsreceived">
- $LANG_CONST(S_NewItemsRcvdNewHtml)$
- </div>
- </div>
- <div id="newspapertitle">
- $INCLUDE(headerimg.inc)$
- <xsl:choose>
- <!-- link to feed's homepage for channel newspaper -->
- <!-- ($feed-type!='newsbin') and ($feed-type!='watch') -->
- <xsl:when test="(@feedId!='') and ($newspaper-type='channel') and (channel/link)">
- <a href="fdaction:?action=gotofeedlink&feedId={@feedId}" title="{title}">
- <xsl:value-of select="title" disable-output-escaping="yes"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="title" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </div> <!-- pagehead -->
-
- <div id="container">
- <!--
- THUMBNAILS (Media RSS - test with Flickr and Yahoo Image Search feeds)
- -->
- <xsl:if test="$SHOW-THUMBNAIL-PANEL$!=0">
- <xsl:variable name="nds_thumbnails" select="channel/item/thumbnail"/>
- <xsl:if test="$nds_thumbnails">
- <xsl:call-template name="groupheader">
- <xsl:with-param name="group-id" select="'thumbnails'"/>
- <xsl:with-param name="group-enable-mark-read" select="0"/>
- <xsl:with-param name="group-caption" select="'$LANG_CONST(S_NewsLblThumbnails)$'"/>
- </xsl:call-template>
- <xsl:variable name="thumbgroup-class">
- <xsl:choose>
- <xsl:when test="$THUMBNAILS-EXPANDED$=0">groupitems collapsed</xsl:when>
- <xsl:otherwise>groupitems</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <div id="thumbnails_group" class="{$thumbgroup-class}">
- <xsl:for-each select="$nds_thumbnails">
- <xsl:variable name="thumbnail-url" select="@url"/>
- <xsl:variable name="thumbnail-title" select="../title"/>
- <xsl:variable name="thumbnail-link">fdaction:?action=gotopostlink&feedid=<xsl:value-of select="../@feedId"/>&postid=<xsl:value-of select="../@postId"/>&markpostread=1</xsl:variable>
- <xsl:variable name="thumbnail-height" select="@height"/>
- <xsl:variable name="thumbnail-width" select="@width"/>
- <a href="{$thumbnail-link}" title="{$thumbnail-title}">
- <xsl:choose>
- <xsl:when test="$thumbnail-height=0 or $thumbnail-width=0">
- <img src="{$thumbnail-url}" class="thumbnail" />
- </xsl:when>
- <xsl:otherwise>
- <img src="{$thumbnail-url}" class="thumbnail" height="{$thumbnail-height}" width="{$thumbnail-width}" />
- </xsl:otherwise>
- </xsl:choose>
- </a>
- </xsl:for-each>
- </div>
- </xsl:if>
- </xsl:if>
- <!--
- NEWS ITEMS
- -->
- <xsl:choose>
- <!-- no items -->
- <xsl:when test="$item-count=0">
- <div class="noitems">
- <xsl:choose>
- <xsl:when test="($newspaper-type='search') or ($newspaper-type='newsitemarray')">$LANG_CONST(S_NoItemsInNewspaperSearch)$</xsl:when>
- <xsl:otherwise>$NO-ITEMS-IN-FILTER$
- <!-- $LANG_CONST(S_NoItemsInNewspaperFilter)$ (<a href="fdaction:?action=changenewspaperfilter" title="$LANG_CONST(S_ChangeNewspaperFilter)$"><xsl:value-of select="$nwsp-filter"/>)</a> --></xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:when>
-
- <!-- output items in groups - note that fd:group is set by FeedDemon based on customer's "group by" preference -->
- <xsl:otherwise>
- <xsl:for-each select="channel/item[count(. | key('key-group', groupId)[1]) = 1]">
- <!-- must pre-sort by @sortIndex or else some folders will sort by date incorrectly -->
- <xsl:sort select="@sortIndex" data-type="number"/>
- <xsl:variable name="groupid" select="groupId"/>
- <xsl:variable name="feedId" select="@feedId"/>
- <xsl:call-template name="groupheader">
- <xsl:with-param name="group-id" select="$groupid"/>
- <xsl:with-param name="group-caption" select="groupId/@caption"/>
- <xsl:with-param name="group-feed-id" select="$feedId"/>
- </xsl:call-template>
- <div class="groupitems" id="{$groupid}_group">
- <xsl:for-each select="key('key-group', groupId)">
- <!-- now re-sort within each group -->
- <xsl:sort select="@sortIndex" data-type="number"/>
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </div>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </div> <!-- container -->
- </body>
- </html>
- </xsl:template>
-
- <!-- news item template -->
- <xsl:template match="item">
- <xsl:variable name="feedId" select="@feedId"/>
- <xsl:variable name="postId" select="@postId"/>
- <!-- must wrap in container so entire post can be hidden if deleted by customer -->
- <div id="{$postId}_container">
- <!-- important: name attribute must contain feedId:postId -->
- <div class="fdnewsitem" name="{$feedId}:{$postId}">
- <xsl:variable name="itemclass">
- <xsl:choose>
- <xsl:when test="state/@read=0 and state/@flagged!=0">unread flagged</xsl:when>
- <xsl:when test="state/@read=0">unread</xsl:when>
- <xsl:when test="state/@flagged!=0">flagged</xsl:when>
-
- <xsl:otherwise>normal</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="show-this-excerpt" select="excerpt and $show-excerpts=1 and $item-count>1"/>
- <xsl:variable name="itemlink" select="link"/>
-
- <div class="newsitemtitle">
- <!-- image extracted from this post (excerpt only) -->
- <xsl:if test="postImageUrl and $show-this-excerpt">
- <a id="{$postId}_fdpostimg" href="{postImageUrl/@href}" title="{postImageUrl/@title}"><img class="fdpostimg" src="{postImageUrl}" /></a>
- </xsl:if>
-
- <!-- toggle excerpt/description -->
- <xsl:if test="($show-this-excerpt) or (description and $show-headlines-only)">
- <a class="icon" href="fdaction:?action=toggleexcerpt&postid={$postId}&feedid={$feedId}">
- <img class="toggle icon" src="$IMAGEDIR$arrowright2.gif" id="{$postId}_img_toggle_excerpt" align="absmiddle" />
- </a>
- </xsl:if>
- <!-- show "play media" icon for items containing media:player -->
- <xsl:variable name="playerurl" select="player/@url" />
- <xsl:if test="$playerurl">
- <a href="{$playerurl}" title="$LANG_CONST(S_NewsHintPlayMedia)$"><img style="margin-right: 6px" src="$IMAGEDIR$play-media.gif" align="absmiddle" /></a>
- </xsl:if>
- <!-- item title -->
- <xsl:choose>
- <xsl:when test="link">
- <a class="newsitemtitle {$itemclass}" id="{$postId}_title" href="fdaction:?action=gotopostlink&feedid={$feedId}&postid={$postId}&markpostread=1" title="$LANG_CONST(S_NewsHintGotoPost)$">
- <xsl:value-of select="title" disable-output-escaping="yes"/>
- </a>
- <!-- goto post link in new tab -->
- <a class="icon" href="fdaction:?action=gotopostlink&newtab=1&feedid={$feedId}&postid={$postId}&markpostread=1" title="$LANG_CONST(S_NewsHintOpenInNewTab)$">
- <img class="icon" src="$IMAGEDIR$linknew.gif" align="absmiddle" />
- </a>
- </xsl:when>
- <xsl:otherwise>
- <span class="newsitemtitle {$itemclass}"><xsl:value-of select="title" disable-output-escaping="yes"/></span>
- </xsl:otherwise>
- </xsl:choose>
- </div>
-
- $INCLUDE(postactions.inc)$
-
- <!-- add tooltip (title) to entire dateline DIV when showing headlines so that entire dateline appears in tooltip (useful when text is cropped) -->
- <xsl:variable name="post-tooltip">
- <xsl:if test="$show-headlines-only">
- <xsl:value-of select="dateDisplay"/>
- <xsl:if test="author"> | <xsl:value-of select="author" disable-output-escaping="yes"/></xsl:if>
- <xsl:if test="source"> | <xsl:value-of select="source"/></xsl:if>
- </xsl:if>
- </xsl:variable>
-
- <div class="dateline" title="{$post-tooltip}">
- <xsl:value-of select="dateDisplay"/>
- <xsl:if test="author">
- <span class="sep">|</span><xsl:value-of select="author" disable-output-escaping="yes"/>
- </xsl:if>
- <!-- show source if available - but only show for channel newspaper if this is a news bin or watch-->
- <xsl:if test="source">
- <xsl:if test="($newspaper-type!='channel') or ($feed-type='newsbin') or ($feed-type='watch')">
- <span class="sep">|</span>
- <xsl:choose>
- <!-- htmlUrl is a FeedDemon attribute -->
- <xsl:when test="source/@htmlUrl">
- <a href="{source/@htmlUrl}" title="{source}"><xsl:value-of select="source"/></a>
- </xsl:when>
- <xsl:otherwise>
- <span title="{source}"><xsl:value-of select="source"/></span>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:if>
- <!-- categories -->
- <!-- <xsl:if test="category">
- (<xsl:for-each select="category">
- <xsl:if test="position() > 1">, </xsl:if>
- <a href="fdaction:?action=showcategory&category={.}&feedid={$feedId}"><xsl:value-of select="."/></a>
- </xsl:for-each>)
- </xsl:if> -->
- </div>
-
- $INCLUDE(postenclosure.inc)$
-
- <!-- finally, the description -->
- <xsl:if test="description">
- <xsl:choose>
- <!-- for headline view, output no description or excerpt (FD code will insert full description when customer expands item) -->
- <xsl:when test="$show-headlines-only">
- <div id="{$postId}_description" class="collapsed description" />
- </xsl:when>
- <!-- show excerpt - note that the full description is inserted dynamically by FeedDemon when the excerpt is expanded -->
- <xsl:when test="$show-this-excerpt">
- <div class="description excerpt">
- <span id="{$postId}_description" class="collapsed">
- <xsl:value-of select="excerpt" disable-output-escaping="yes"/>
- </span>
- <a class="more" title="$LANG_CONST(S_NewsHintExpand)$" href="fdaction:?action=toggleexcerpt&postid={$postId}&feedid={$feedId}" id="{$postId}_expand_link">$LANG_CONST(S_NewsLblExpand)$</a>
- </div>
- </xsl:when>
- <!-- show full post -->
- <xsl:otherwise>
- <div class="description">
- <xsl:value-of select="description" disable-output-escaping="yes"/>
- </div>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </div> <!-- fdnewsitem -->
-
- <!-- separator between news items -->
- <div class="newsitemsep"></div>
- </div> <!-- container -->
- </xsl:template>
-
- <!-- group header template -->
- <xsl:template name="groupheader">
- <xsl:param name="group-id"/>
- <xsl:param name="group-caption"/>
- <xsl:param name="group-feed-id"/>
- <xsl:param name="group-enable-mark-read"/>
-
- <div class="groupheader collapsible" id="{$group-id}_header">
- <!-- expand/collapse -->
- <a href="fdaction:?action=togglecollapse&id={$group-id}"><img src="$IMAGEDIR$arrowdown.gif" id="{$group-id}_img_expand" border="0" align="right" class="button" /></a>
- <!-- group caption -->
- <span class="groupcaption"><a href="fdaction:?action=togglecollapse&id={$group-id}"><xsl:value-of select="$group-caption" disable-output-escaping="yes"/></a></span>
- <!-- mark group as read -->
- <xsl:if test="($group-enable-mark-read != 0)">
- <a href="fdaction:?action=markgroupread&groupid={$group-id}" title="$LANG_CONST(S_NewsHintMarkGroupRead)$"><img src="$IMAGEDIR$unread.gif" align="absmiddle" /></a>
- </xsl:if>
- </div>
- </xsl:template>
-
- </xsl:stylesheet>